Skip to content

gh-145521: Add 'infer_variance' parameter to ParamSpec class#145522

Merged
JelleZijlstra merged 2 commits into
python:mainfrom
hyperkai:hyperkai-patch-1
May 3, 2026
Merged

gh-145521: Add 'infer_variance' parameter to ParamSpec class#145522
JelleZijlstra merged 2 commits into
python:mainfrom
hyperkai:hyperkai-patch-1

Conversation

@hyperkai

@hyperkai hyperkai commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news awaiting review labels Mar 5, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Mar 5, 2026
@hyperkai hyperkai changed the title Add 'infer_variance' parameter to ParamSpec class gh-145521: Add 'infer_variance' parameter to ParamSpec class Mar 5, 2026
@AlexWaygood AlexWaygood added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Mar 5, 2026
@inventshah

Copy link
Copy Markdown
Contributor

Should we add some text about the version this changed (e.g. 3.12)?

@AlexWaygood

Copy link
Copy Markdown
Member

Should we add some text about the version this changed (e.g. 3.12)?

We can do. But we shouldn't devote too much space to this, because ParamSpecs are always invariant. It's a bit confusing that they have this parameter; type checkers will just ignore it.

@JelleZijlstra
JelleZijlstra enabled auto-merge (squash) May 3, 2026 23:00
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32518599 | 📁 Comparing eb0b7ab against main (4144062)

  🔍 Preview build  

1 file changed
± library/typing.html

@JelleZijlstra
JelleZijlstra merged commit 2e94f14 into python:main May 3, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs May 3, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @hyperkai for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @hyperkai and @JelleZijlstra, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2e94f14310e8ab62f41dd01276f2c69cb3d36da2 3.14

@miss-islington-app

Copy link
Copy Markdown

Sorry, @hyperkai and @JelleZijlstra, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2e94f14310e8ab62f41dd01276f2c69cb3d36da2 3.13

@StanFromIreland

Copy link
Copy Markdown
Member

@hyperkai can you please do the backports?

@serhiy-storchaka

Copy link
Copy Markdown
Member

Please don't forget about backports.

@bedevere-app

bedevere-app Bot commented Jul 17, 2026

Copy link
Copy Markdown

GH-153824 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 17, 2026
@bedevere-app

bedevere-app Bot commented Jul 17, 2026

Copy link
Copy Markdown

GH-153825 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 17, 2026
JelleZijlstra added a commit that referenced this pull request Jul 17, 2026
…H-145522) (#153824)

(cherry picked from commit 2e94f14)

Co-authored-by: Kai (Kazuya Ito) <kazya.ito.dream@gmail.com>
JelleZijlstra added a commit that referenced this pull request Jul 17, 2026
…H-145522) (#153825)

(cherry picked from commit 2e94f14)

Co-authored-by: Kai (Kazuya Ito) <kazya.ito.dream@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

The docs should also say infer_variance parameter with typing.ParamSpec explanation

6 participants